

export default { 
	
	//日期时间格式化
	formatDateTime: function(dateTime, splitYmd, spliteHms) {
		
		var date = new Date(dateTime);
		var YY = date.getFullYear() + (splitYmd || '.');
		var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + (splitYmd || '.');
		var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
		var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + (spliteHms || ':');
		var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + (spliteHms || ':');
		var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
		
		return YY + MM + DD + ' ' + hh + mm + ss;
	}
}



